
$(document).ready(function(){ 
	$('#header').animate({'top':'0px'},400);
	$("#saveBtn").click(function(){
		var oldPassword = $("#oldPassword").val();
		var newPassword1 = $("#newPassword1").val();
		var newPassword2 = $("#newPassword2").val();
		if(newPassword1!=newPassword2){
			$('#strMessage').text("两次输入的新密码不一致！");
			return;
		}
		$.post(path+"/changePassword!savePassword.action",{oldPassword:oldPassword,newPassword1:newPassword1,newPassword2:newPassword2},
			function(data, textStatus){
				$('#strMessage').text(data.strMessage);
		    },"json"
		);
	});
});

function goBack(){
	window.location.href=path+"/main.jsp";
}

function clearPasswords(){
	$("input").val('');
}
